/**
 * 
 */
	var zTree=null;
	var zNodes =[];
	var dmId='';
	var clickNode="";
	var posY=0;
	var colorVal="";
	var fontSize="";
	var currentPos=0;	//历史记录当前位置
    var historyArr=[]; //历史记录
	if(posYs!=0)posY=posYs;
			var setting = {
				view: {
					showLine: false,
					showIcon: false,
					selectedMulti: false,
					dblClickExpand: false,
					addDiyDom: addDiyDom
				}
//			,async : {
//					enable : true,
//					url : getUrl
//				}
			,
				data: {
					simpleData: {
						enable: true
					}
				},
				callback: {
					beforeClick: beforeClick,
					onClick : onClick,
					onNodeCreated: zTreeOnNodeCreated
				}
			};
			
			function zTreeOnNodeCreated(event, treeId, treeNode) {
				if(dmId==='')
				dmId=top.dmIds;
				if(dmId===treeNode.id)
					clickNode=treeNode.tId;
				zNodes.push(treeNode);
			}
			function beforeClick(treeId, treeNode) {
				zTree.expandNode(treeNode);
				return true;
			}
			function addDiyDom(treeId, treeNode) {
				var spaceWidth = 5;
				var switchObj = $("#" + treeNode.tId + "_switch"),
				icoObj = $("#" + treeNode.tId + "_ico");
				switchObj.remove();
				icoObj.before(switchObj);
				if (treeNode.level > 1) {
					var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>";
					switchObj.before(spaceStr);
				}
			}
			function loadTree(projectId) {
				window.projectId=projectId;
				var guolvFit = window.fitName;
//				if(guolvFit!=""){
			 		var param={};
					param.projectId=projectId;
					param.fitName=guolvFit;
					$.ajax({
						async : false,
						type : 'POST',
						dataType : "json",
						url :"/tree/initTree?type=ietm",//请求的action路径
						data:param,
						success : function(data) { //请求成功后处理函数。
						$.fn.zTree.init($("#treeDemo"), setting, data);
						zTree = $.fn.zTree.getZTreeObj("treeDemo");
						zTree.expandAll(true);
						$("#treeDemo").addClass("showIcon");
					}
				});					
//				}else{
//				$.ajax({
//					async : false,
//					type : 'POST',
//					dataType : "json",
//					url :"/tree/initTree/"+projectId,//请求的action路径
//					success : function(data) { //请求成功后处理函数。
//					$.fn.zTree.init($("#treeDemo"), setting, data);
//					zTree = $.fn.zTree.getZTreeObj("treeDemo");
//					zTree.expandAll(true);
//					$("#treeDemo").addClass("showIcon");
//				}
//			});
//				}
			}	
			//拼装获取字节点的url
			function getUrl(treeId, treeNode) {
				var param = "parentId=" + treeNode.id;
				if(treeNode.isParent){
					if("true"===treeNode.isLast){
						param+="&type=dm";
					}else{
						param+="&type=pm";
					}
				}
				return "/tree/getChildrenTrees?"+ encodeURI(param) + "&p="
						+ new Date();
			}
			//点击树出现右侧界面
			function onClick(event, treeId, treeNode) {
				var param;
				var type=treeNode.type;
				dmId=treeNode.id;
				if("pm"===type){
					if(treeNode.level<1){
					param="id="+treeNode.id+"&nodeName="+treeNode.name+"&level="+treeNode.level+"&type=pm";
					param="/tree/getChildrenData?"+encodeURI(param);						
					$("#publiciframe").attr('src',param);
				}else{
					param="id="+treeNode.id+"&nodeName="+treeNode.name;
					param="/tree/getChildrenList?"+encodeURI(param);					
					$("#publiciframe").attr('src',param);
				}
					if($("#prePage").attr('src').indexOf('_dis')<0){
					//$("#goback").attr('src',$("#goback").attr('src').replace('IETM_btn_cx','IETM_disbtn_cx'));
					//$("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_btn_cz','IETM_disbtn_cz'));
					$("#prePage").attr('src',$("#prePage").attr('src').replace('IETM_btn_back','IETM_disbtn_back'));
					$("#nextPage").attr('src',$("#nextPage").attr('src').replace('IETM_btn_next','IETM_disbtn_next'));
					$('#nav-tags').children('img').attr('src',$('#nav-tags').children('img').attr('src').replace('IETM_btn_sq','IETM_disbtn_sq'));
					$('#nav-annotations').children('img').attr('src',$('#nav-annotations').children('img').attr('src').replace('IETM_btn_zs','IETM_disbtn_zs'));
					$('#nav-quotes').children('img').attr('src',$('#nav-quotes').children('img').attr('src').replace('IETM_btn_yy','IETM_disbtn_yy'));
					$('#printDm').children('img').attr('src',$('#printDm').children('img').attr('src').replace('IETM_btn_dy','IETM_disbtn_dy'));
					}
				}else{
					$("#publiciframe").attr('src',treeNode.url);
					$("#goback").attr('src',$("#goback").attr('src').replace('IETM_disbtn_cx','IETM_btn_cx'));
					$("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_disbtn_cz','IETM_btn_cz'));
					$("#prePage").attr('src',$("#prePage").attr('src').replace('IETM_disbtn_back','IETM_btn_back'));
					$("#nextPage").attr('src',$("#nextPage").attr('src').replace('IETM_disbtn_next','IETM_btn_next'));
					$('#nav-tags').children('img').attr('src',$('#nav-tags').children('img').attr('src').replace('IETM_disbtn_sq','IETM_btn_sq'));
					$('#nav-annotations').children('img').attr('src',$('#nav-annotations').children('img').attr('src').replace('IETM_disbtn_zs','IETM_btn_zs'));
					$('#nav-quotes').children('img').attr('src',$('#nav-quotes').children('img').attr('src').replace('IETM_disbtn_yy','IETM_btn_yy'));
					$('#printDm').children('img').attr('src',$('#printDm').children('img').attr('src').replace('IETM_disbtn_dy','IETM_btn_dy'));
					
				}
				//点击过的历史记录DM页面的前进后退
				if (currentPos >= historyArr.length - 1){
                    historyArr.push(dmId);
                    currentPos = historyArr.length - 1;
                }else{
                    historyArr.splice(currentPos + 1, 0, dmId);
                    currentPos = currentPos + 1;
                }
				//点击过的历史记录培训系统的返回
				if (ietmCurrentPos >= ietmHistoryArr.length - 1){
					filename="ietm-home?"+dmId;
					ietmHistoryArr.push(filename);
					ietmCurrentPos = ietmHistoryArr.length - 1;
			    }else{
			    	filename="ietm-home?"+dmId;
			    	ietmHistoryArr.splice(ietmCurrentPos + 1, 0, filename);
			        ietmCurrentPos = ietmCurrentPos + 1;
			    }
				}
			/**
			 * print
			 * @param id_str
			 */
			function do_print(id_str)//id-str 打印区域的id
			{
			   	var $iframe = $("#publiciframe");
 			   	var $ele = $iframe.contents().find('#content');
 			   	var pcontents="<ul id='dmList' class='filetree'>";
 			    $ele.find("p").each(function(){
 					
 					if($(this).attr('class')==='titleItalic'){
 						pcontents+="<li><span><a>"+$(this).text()+"</a></span></li>";
 						}
 					else if($(this).attr('class')==='subtitle'){
 						pcontents+="<li><span><a>"+$(this).text()+"</a></span></li>";
 						}
 					else if($(this).attr('class')==='heading'){
 						pcontents+="<li><span><a>"+$(this).text()+"</a></span></li>";
						}
 					});
				var tt = document.getElementById(id_str);
				var el =  tt.contentWindow.document.body.innerHTML;
				var iframe = document.createElement('IFRAME');
				var doc = null;
				iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
				document.body.appendChild(iframe);
				doc = iframe.contentWindow.document;
				//alert(el);
				
				// 引入打印的专有CSS样式，www.111Cn.net根据实际修改
				doc.write("<LINK rel='stylesheet' type='text/css' href='../css/dm/s1000D.css'>");
				doc.write('<div>' + pcontents+el + '</div>');
				
				doc.close();
				iframe.contentWindow.focus();
				iframe.contentWindow.print();
				if (navigator.userAgent.indexOf("MSIE") > 0)
				{
				     document.body.removeChild(iframe);
				}
			}
			
			
			
			function do_printOne(id_str)//id-str 打印区域的id
			{
				//var el = document.getElementById(id_str).contentWindow;
			   	var $iframe = $("#publiciframe");
 			  	var $ele = $iframe.contents().find('#content');
 			  	var $div1 = $iframe.contents().find('div[id^="anno"]');
 			  	$div1.remove();
 				var $img = $iframe.contents().find('img[id^="anno"]');
 			  	$img.remove();
 			  	var $eleTitle = $iframe.contents().find('.dmtitle');
 			  	if(!($eleTitle.text()))
 			  	{
 			  		   alert("请选择叶子节点打印，谢谢！");
 			  		   return;
 			  	}
 			  	var $eleSyx = $iframe.contents().find('.home-d-t-syx span:eq(1)');
 			  	//密级
 			  	var secCode = $.trim(($eleSyx.text()).substring(5));
 			  	var allHtml = "<div>";
 			  	//1.dmtitle
 			  	if(!secCode)
 			  	{
 			  		var dmTitle = " <p><span><h2>"+$eleTitle.text()+"</h2></span></p>";
 			  	}
 			  	else
 			  	{
 			  		var dmTitle = " <p><span><h2>"+$eleTitle.text()+"("+secCode+")"+"</h2></span></p>";
 			  	}
 			  	allHtml += dmTitle;
 			  	  //2.data infomation
 			  	var $dataModelInfo = $iframe.contents().find('div .home-d-t .home-d-t-pub .home-d-t-title');
 			  	//3datamodelinfo
 			  	if($dataModelInfo.text()&&typeof($dataModelInfo.text())!="undefined")
 			  	{
 			  		var dataModelInfo = " <div class='.home-d-t-title'><span><h2>"+$dataModelInfo.text()+"</h2></span></div>";
 			  		allHtml += dataModelInfo;
 			  	}
 			  	var $dataInfo = $iframe.contents().find('div .home-d-t-content');
 			  	if(typeof($dataInfo.html())!="undefined")
 			  	{
 			  		allHtml +=$dataInfo.html()
 			  	}
 			  	
 			  	//3.目录 padding: 0px 0px 2px 16px;width:100%
 			   	var pcontents="<div><ul id='dmList'>";
 			   	var tabcontents="<li></li><li></li><li></li><li></li><li></li><li></li><li style='font-weight:bold;margin-left: 20px;'><span>表格列表</span></li>";
 			   	var piccontents="<li style='font-weight:bold;margin-left: 20px;'><span>图片列表</span></li>";
 			    var textcontents="<li style='font-weight:bold;margin-left: 20px;'><span>文档内容</span></li>";
 			   $ele.find("caption").each(function(){
 				   tabcontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>";
 			   });
 			   	pcontents+=tabcontents;
  			   $ele.find(".textcenter").each(function(){
  				 piccontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>";
 			   });			   	
 			   	pcontents+=piccontents;
 			   
 			    $ele.find("p").each(function(){
 					if($(this).attr('class')==='titleItalic'){
 						textcontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>";
 						}
 					else if($(this).attr('class')==='subtitle'){
 						textcontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>";
 						}
 					else if($(this).attr('class')==='heading'){
 						textcontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>";
						}
 					else if($(this).attr('class')==='indent'){
 						if($(this).text().indexOf("？")>=0){
 							textcontents+="<li style='margin-left: 40px;'><span><a>"+$(this).text()+"</a></span></li>"; 							
 						}
						}
 					});			
 			   pcontents+=textcontents;	
 			  pcontents+="</ul></div>";
 			   allHtml +=pcontents;
 			   //4 内容
 			   allHtml += $ele.html();
				var iframe = document.createElement('IFRAME');
				var doc = null;
				iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
				document.body.appendChild(iframe);
				doc = iframe.contentWindow.document;
				//alert(el);
				
				// 引入打印的专有CSS样式，www.111Cn.net根据实际修改
				doc.write("<LINK rel='stylesheet' type='text/css' href='../css/main.css'>");
				doc.write("<LINK rel='stylesheet' type='text/css' href='../css/dm/s1000D.css'>");
				doc.write("<LINK rel='stylesheet' type='text/css' href='../jqueryTreeview/jquery.treeview.css'>");
				doc.write(allHtml);
				
				doc.close();
//				setTimeout("printContent()",2000);
//				function printContent(){
					iframe.contentWindow.focus();
					iframe.contentWindow.print();
//				}
				if (navigator.userAgent.indexOf("MSIE") > 0)
				{
				     document.body.removeChild(iframe);
				}
			}
			/**
			 * 页面颜色
			 * @param c
			 * @returns
			 */
			function bgcolorchange(c){
				colorVal=c;
				$('#publiciframe').contents().find("body").css("background",c);
			}
			
			$(function(){
				if(posYs!=0)posY=posYs;
				if("nodata"===$("#pList").val()){
					changeMain('project');
				}
				else{
				if(toggleFlag){
					$(".toggle-hidden").click();
				}
				dmId=window.parent.document.getElementById("treeNo").value;
				if(window.parent.document.getElementById("projectIdTag")&&""!==window.parent.document.getElementById("projectIdTag").value){
				projectId=window.parent.document.getElementById("projectIdTag").value;
				}
				window.parent.document.getElementById("treeNo").value="";
				adaptive();
				homeTabs();
				//切换项目加载树
				window.projectCode=$('#project').find('option:selected').attr('code');
				$('#project').change(function(){
					loadTree($(this).val());
					window.projectCode=$('#project').find('option:selected').attr('code');
					$("#sns").load("/html/"+$('#project').find('option:selected').attr('code')+"/sns.html");
					var node = zTree.getNodes()[0];
					zTree.selectNode(node);
					zTree.setting.callback.onClick(null, zTree.setting.treeId, node);
				});
				 $("#bgcolor-dig").click(function(){
					$(".bgcolor-border").toggle();
				 });
				 $(".bgcolor-colse").click(function(){
					$(this).parent(".bgcolor-border").hide();
				 });
				 $(".home-zoom a").click(function(){
					var thisEle = $('#publiciframe').contents().find("#article").css("font-size"); //获取当前字体大小
					var textFontSize = parseInt(thisEle);//把当前字体大小转换为整数
					var className = $(this).attr("class");
					if(className == "bigger"){
							textFontSize -= 1;
					}else if(className == "smaller"){
							textFontSize += 1;
					}
					if(textFontSize>30||textFontSize<16){return false;}//超出指定字体大小，停止运行
					fontSize=textFontSize;
					$('#publiciframe').contents().find("#article").css("font-size",textFontSize+"px" );//赋值
				 });
				//加载树
				if(projectId===""){
					loadTree($('#project').val());
					$("#sns").load("/html/"+$('#project').find('option:selected').attr('code')+"/sns.html");	
				}else{
					$("#project").find('option').each(function(){
						if($(this).attr("value")===projectId){
							$(this).attr("selected",true);
						}
					});
					loadTree(projectId);
					$("#sns").load("/html/"+$('#project').find('option:selected').attr('code')+"/sns.html");						
				}
				$('#printDm').on('click', function(e) {
					if($(this).children('img').attr('src').indexOf('_dis')<0){
			        e.preventDefault();			      
			        do_printOne('publiciframe');   
					}
			    });
				
				$("#publiciframe").attr('src','/tree/initList?id='+projectId);
				//$('#structure').attr("src","/html/"+$('#project').find('option:selected').attr('zip')+"/sns.html");
				//书签弹出
				$('#nav-tags').bind('click', function(e) {
					if($(this).children('img').attr('src').indexOf('_dis')<0){
			        e.preventDefault();
			        var diag = new $.Zebra_Dialog({
			            source: {'iframe': {
			            	'id':'nav-annoations-dialog',
			                'src':'nav-tags?projectId='+projectId+'&dmodelId='+dmId,
			                'height':500,
			            }},
			            width:1000,
			            title:'书签',
			            buttons: ['关闭']
			        });
					}
			    });
				//注释弹出
				$('#nav-annotations').on('click', function(e) {
					if($(this).children('img').attr('src').indexOf('_dis')<0){
			        e.preventDefault();
			        var diag = new $.Zebra_Dialog({
			            source: {'iframe': {
			            	'id':'nav-annoations-dialog',
			                'src':'nav-annotations?projectId='+projectId+'&dmodelId='+dmId,
			                'height':500,
			            }},
			            width:1000,
			            title:'注释',
			            buttons: ['关闭']
			        });
					}
			    });
				//引用弹出
				
				$('#nav-quotes').on('click', function(e) {
					if($(this).children('img').attr('src').indexOf('_dis')<0){
							        e.preventDefault();
				 var quote=0;
			       var content='  <div class="table-head"><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">'
			    	   +'<thead><tr>'
	          				+'<td width="6%">序号</td><td width="44%">编码</td><td width="44%">名称</td>'
		          		+'</tr>'
	          		+'</thead>'
	          		+'<tbody>'
	          		var data="";
			       $("#publiciframe").contents().find("a").each(function(index){ 
			   		if($(this).attr('target')==='home'){
			   			for(var i=0;i<zNodes.length;i++){
			   				if(zNodes[i].code!=undefined&&zNodes[i].code!=null&&zNodes[i].code!='null'){
								if("DMC-"+$(this).text()===zNodes[i].code.substring(0,zNodes[i].code.lastIndexOf('_'))){
									name=zNodes[i].name;
									break;
								}
							}
			   			}
			   			if($(this).text()!=''){
			   			    quote++;
			   				data+='<tr onclick=linkDm(\''+$(this).attr('href')+'\')><td>'+(quote)+'</td><td>'+$(this).text()+'</td><td>'+name+'</td></tr>'
			   			}else 
			   				data="";
			   		}
			       	});
			       var data1='</tbody></table></div>';
			        var diag = new $.Zebra_Dialog(content+data+data1,{
			           /* source: {'iframe': {
			                'src':'nav-quotes.html',
			                'height':500,
			            }},*/
			            width:1000,
			            max_height:600,
			            title:'引用',
			            buttons:['关闭']
			        });
					}
			    });
				/**
				 * 文件内容检索
				 */
				$('#dmSearch').click(function(){
					var sea=$('#dmData').val();
					if(sea&&''!=sea.trim()){
						//$("#publiciframe").contents().find("span[rel='mark']").removeAttr("class").removeAttr("style").removeAttr("rel");
						$("#publiciframe").contents().find("body").textSearch(sea);
						document.getElementById('publiciframe').contentWindow.textSearch11();
					}
					//$("#publiciframe").contents().find("body").html($("#publiciframe").contents().find("body").html().replace(new RegExp(sea,"gm"),'<span style="background-color:#0ff">'+sea+'</span>'));
				});
				
				if(zTree){
					$('a[id='+clickNode+'_a]').trigger('click');
				}
			}
			});
			
			function clickDw(id){
				for(var i=0;i<zNodes.length;i++){
					if(id===zNodes[i].id){
						$(".ietm-home-l-tow-b").eq(0).scrollTop(($('a[id='+zNodes[i].tId+'_a]').position().top)-200);
						$('a[id='+zNodes[i].tId+'_a]').trigger('click');
					}
				}
			}
			
			function linkDm(param){
				closeDailog();
				$('#publiciframe').attr('src',param);
			}
			function closeDailog(){
				$('.ZebraDialog_Close').trigger('click');
			}
			function goback(e){
				if(e.src.indexOf('_dis')>=0){}
				else{
                    var lastPos = currentPos;
                    currentPos = (currentPos <= 0 ? 0 : (currentPos-1));
                    if(0==currentPos){
                    	$("#goback").attr('src',$("#goback").attr('src').replace('IETM_btn_cx','IETM_disbtn_cx'));
                    }
                    $("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_disbtn_cz','IETM_btn_cz'));
                    if (lastPos == currentPos){
                        return;
                    }
                    var currentNodeId = historyArr[currentPos];
                    if (historyArr[lastPos] == currentNodeId){ // 如果一样，则继续向后寻找
                    	$("#goback").click();
                        return;
                    }
                    var node = zTree.getNodeByParam("id",currentNodeId);
                    zTree.selectNode(node);
                    //zTree.setting.callback.onClick(null, zTree.setting.treeId, node);
                    isDisable(node);
				}
				}
			function gonext(e){
				if(e.src.indexOf('_dis')>=0){}
				else{
                    var lastPos = currentPos;
                    if (0 == historyArr.length-1){
                        currentPos = 0;
                    }else{
                        currentPos = (currentPos >= (historyArr.length-1) ? (historyArr.length-1) : (currentPos+1));
                    }
                    if(historyArr.length-1==currentPos){
                    	$("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_btn_cz','IETM_disbtn_cz'));
                    }
                    $("#goback").attr('src',$("#goback").attr('src').replace('IETM_disbtn_cx','IETM_btn_cx'));
                    if (lastPos == currentPos){
                    	return;
                    }
                    var currentNodeId = historyArr[currentPos];
                    if (historyArr[lastPos] == currentNodeId){ // 如果一样，则继续向前寻找
                    	$("#gonext").click();
                        return;
                    }
                    var node = zTree.getNodeByParam("id",currentNodeId);
                    zTree.selectNode(node);
                    isDisable(node);
				}
			}
			function isDisable(treeNode){
				 if("pm"===treeNode.type){
					 if(treeNode.level<1){
							param="id="+treeNode.id+"&nodeName="+treeNode.name+"&level="+treeNode.level+"&type=pm";
							param="/tree/getChildrenData?"+encodeURI(param);						
							$("#publiciframe").attr('src',param);
						}else{
							param="id="+treeNode.id+"&nodeName="+treeNode.name;
							param="/tree/getChildrenList?"+encodeURI(param);					
							$("#publiciframe").attr('src',param);
						}
                 	//$("#goback").attr('src',$("#goback").attr('src').replace('IETM_btn_cx','IETM_disbtn_cx'));
 					//$("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_btn_cz','IETM_disbtn_cz'));
 					$("#prePage").attr('src',$("#prePage").attr('src').replace('IETM_btn_back','IETM_disbtn_back'));
 					$("#nextPage").attr('src',$("#nextPage").attr('src').replace('IETM_btn_next','IETM_disbtn_next'));
 					$('#nav-tags').children('img').attr('src',$('#nav-tags').children('img').attr('src').replace('IETM_btn_sq','IETM_disbtn_sq'));
 					$('#nav-annotations').children('img').attr('src',$('#nav-annotations').children('img').attr('src').replace('IETM_btn_zs','IETM_disbtn_zs'));
 					$('#nav-quotes').children('img').attr('src',$('#nav-quotes').children('img').attr('src').replace('IETM_btn_yy','IETM_disbtn_yy'));
 					$('#printDm').children('img').attr('src',$('#printDm').children('img').attr('src').replace('IETM_btn_dy','IETM_disbtn_dy'));
                 }
				 else if("dm"===treeNode.type){
					 $("#publiciframe").attr('src',treeNode.url);
					 //$("#goback").attr('src',$("#goback").attr('src').replace('IETM_disbtn_cx','IETM_btn_cx'));
					 //$("#gonext").attr('src',$("#gonext").attr('src').replace('IETM_disbtn_cz','IETM_btn_cz'));
						$("#prePage").attr('src',$("#prePage").attr('src').replace('IETM_disbtn_back','IETM_btn_back'));
						$("#nextPage").attr('src',$("#nextPage").attr('src').replace('IETM_disbtn_next','IETM_btn_next'));
						$('#nav-tags').children('img').attr('src',$('#nav-tags').children('img').attr('src').replace('IETM_disbtn_sq','IETM_btn_sq'));
						$('#nav-annotations').children('img').attr('src',$('#nav-annotations').children('img').attr('src').replace('IETM_disbtn_zs','IETM_btn_zs'));
						$('#nav-quotes').children('img').attr('src',$('#nav-quotes').children('img').attr('src').replace('IETM_disbtn_yy','IETM_btn_yy'));
						$('#printDm').children('img').attr('src',$('#printDm').children('img').attr('src').replace('IETM_disbtn_dy','IETM_btn_dy'));
				 }
			}
			function exitAddTag(){
				if(dmId&&""!=dmId){
				document.getElementById('publiciframe').contentWindow.exitAddTag11();
				}
			}
			function refDMparent(code){
				var nodes = zTree.getNodeByParam("dmCode",code);
				if(null!=nodes){
				zTree.expandNode(nodes, true, true, true);//展开该节点及所有子节点
				zTree.selectNode(nodes); //选择定位该节点
                zTree.setting.callback.onClick(null, zTree.setting.treeId, nodes);
				}
			}
			